package com.project.bean;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.project.util.GetDateTime;
import lombok.Data;


import java.text.SimpleDateFormat;
import java.time.*;
import java.util.Date;

/**
 * 凭证主表
 */
@Data
@TableName(value = "gl_voucher")
public class VoucherBean {
    @TableField(value = "accvouchertype")
    private String accvouchertype="0";      //允许为null
    @TableField(value = "addclass")
    private String addclass;            //允许为null
    @TableField(value = "attachment")
    private long attachment;            //允许为null
    @TableField(value = "budgettotalcredit")
    private String budgettotalcredit;   //允许为null
    @TableField(value = "budgettotaldebit")
    private String budgettotaldebit;    //允许为null
    @TableField(value = "checkeddate")
    private String checkeddate;         //允许为null
    @TableField(value = "contrastflag")
    private long contrastflag;          //允许为null
    @TableField(value = "convertflag")
    private String convertflag;         //允许为null
    @TableField(value = "deleteclass")
    private String deleteclass;         //允许为null
    @TableField(value = "detailmodflag")
    private String detailmodflag="Y";       //允许为null


    @TableField(value = "discardflag")
    private String discardflag;


    @TableField(value = "dr")
    private long dr;                    //允许为null
    @TableField(value = "errmessage")
    private String errmessage;          //允许为null
    @TableField(value = "errmessageh")
    private String errmessageh;         //允许为null
    @TableField(value = "explanation")
    private String explanation;         //允许为null
    @TableField(value = "free1")
    private String free1=LocalDate.now().getMonthValue()+"";               //允许为null--调整期间默认为当月
    @TableField(value = "free10")
    private String free10="VOUCHERNEWADD";              //允许为null
    @TableField(value = "free2")
    private String free2;               //允许为null
    @TableField(value = "free3")
    private String free3;               //允许为null
    @TableField(value = "free4")
    private String free4;               //允许为null
    @TableField(value = "free5")
    private String free5;               //允许为null
    @TableField(value = "free6")
    private String free6;               //允许为null
    @TableField(value = "free7")
    private String free7;               //允许为null
    @TableField(value = "free8")
    private String free8;               //允许为null
    @TableField(value = "free9")
    private String free9;               //允许为null


    @TableField(value = "isdifflag")
    private String isdifflag;


    @TableField(value = "modifyclass")
    private String modifyclass;         //允许为null
    @TableField(value = "modifyflag")
    private String modifyflag="YYY";          //允许为null
    @TableField(value = "no")
    private int  no;                    //允许为null--凭证编码
    @TableField(value = "offervoucher")
    private String  offervoucher;       //允许为null

    @TableField(value = "period")
    private String  period=LocalDate.now().getMonthValue()+"";           //允许为null--会计期间---月

    @TableField(value = "pk_casher")
    private String pk_casher;       //允许为null
    @TableField(value = "pk_checked")
    private String pk_checked;      //允许为null
    @TableField(value = "pk_corp")
    private String pk_corp;         //允许为null
    @TableField(value = "pk_glbook")
    private String  pk_glbook;      //允许为null
    @TableField(value = "pk_glorg")
    private String  pk_glorg;       //允许为null
    @TableField(value = "pk_glorgbook")
    private String pk_glorgbook;    //允许为null
    @TableField(value = "pk_manager")
    private String pk_manager="";      //允许为null
    @TableField(value = "pk_prepared")
    private String pk_prepared;     //允许为null
    @TableField(value = "pk_sob")
    private String  pk_sob;         //允许为null
    @TableField(value = "pk_sourcepk")
    private String pk_sourcepk;     //允许为null
    @TableField(value = "pk_srcvoucher")
    private String pk_srcvoucher;   //允许为null


    @TableField(value = "pk_system")
    private String pk_system="XX";

    @TableId(value = "pk_voucher")
    private String  pk_voucher;


    @TableField(value = "pk_vouchertype")
    private String pk_vouchertype="0001DEFAULT000000001"; //允许为null
    @TableField(value = "prepareddate")
    private String  prepareddate= LocalDate.now()+"";  //允许为null--制单日期
    @TableField(value = "signdate")
    private String signdate;       //允许为null
    @TableField(value = "signflag")
    private String signflag="Y";       //允许为null--签字标志
    @TableField(value = "tabflag")
    private String tabflag="N";        //允许为null--默认为N

    @TableField(value = "tallydate")
    private String tallydate=null;      //允许为null -- 单位记账日期

    @TableField(value = "totalcredit")
    private String totalcredit;    //允许为null
    @TableField(value = "totaldebit")
    private String totaldebit;     //允许为null

    @TableField(value = "ts")
    private String ts= GetDateTime.formatYmdhms();  // 格式为  yyyy-mm-dd hh:mm:ss



    @TableField(value = "voucherkind")
    private long  voucherkind;

    @TableField(value = "year")
    private String year= Year.now()+"";            //允许为null 默认为当年

//    @TableField(exist = false)
//    private VoucherInfoBean voucherInfoBean;


    public VoucherBean() {
    }
}
